import request from '@/utils/request'

export default {

    //添加课程信息
    addCourseInfo(courseInfo) {
        return request({
            url: `/eduservice/course/addCourseInfo`,
            method: 'post',
            data: courseInfo
        })
    },

    //查询所有讲师
    getTeacherAll() {
        return request({
            url: `/eduservice/teacher/findAll`,
            method: 'get'
        })
    },

    //根据课程id查询课程基本信息
    getCourseBaseInfo(id) {
        return request({
            url: `/eduservice/course/getCourseBaseInfo/${id}`,
            method: 'get'
        })
    },

    //修改课程信息
    updateCourseInfo(courseInfo) {
        return request({
            url: `/eduservice/course/updateCourseInfo`,
            method: 'post',
            data: courseInfo
        })
    },
    //课程确认信息的显示
    getCoursePublishInfoById(courseId) {
        return request({
            url: `/eduservice/course/getCoursePublishInfoById/${courseId}`,
            method: 'get'
        })
    },
    //课程发布
    finalCoursePublish(courseId) {
        return request({
            url: `/eduservice/course/finalCoursePublish/${courseId}`,
            method: 'get'
        })
    },
    //获取课程列表
    getCourseList() {
        return request({
            url: `/eduservice/course/getCourseList`,
            method: 'get'
        })
    },
    //带分页，带条件获取列表
    getCourseListCondition(current, limit, courseQuery) {
        return request({
            url: `/eduservice/course/getCourseListCondition/${current}/${limit}`,
            method: 'post',
            data:courseQuery
        })
    },
  
    //删除课程
    deleteCourse(courseId) {
        return request({
            url: `/eduservice/course/deleteCourse/${courseId}`,
            method: 'delete'
        })
    },
}